package com.dkm.ec.sale.repository.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.base.db.persistence.dao.IQueryDao;
import com.dkm.biz.repository.AbstractRepository;
import com.dkm.ec.sale.domain.SaleService;
import com.dkm.ec.sale.persistence.dao.SaleServiceQueryDao;
import com.dkm.ec.sale.persistence.entity.SaleServicePo;
import com.dkm.ec.sale.repository.SaleServiceRepository;

/**
 * 对象功能:延保服务 Repository接口的实现类
 * 开发公司:SKG.COM
 * 开发人员:XWP
 * 创建时间:2015-04-22 10:04:03
 */
@Repository
public class SaleServiceRepositoryImpl extends AbstractRepository<String, SaleServicePo,SaleService> implements SaleServiceRepository{
	  
	@Resource
	private  SaleServiceQueryDao saleServiceQueryDao;

	public SaleService newInstance() {
		SaleServicePo po = new SaleServicePo();
		SaleService saleService = SpringHelper.getBean(SaleService.class);
		saleService.setData(po);
		return saleService;
	}

	public SaleService newInstance(SaleServicePo po) {
		SaleService saleService = SpringHelper.getBean(SaleService.class);
		saleService.setData(po);
		return saleService;
	} 
	
	@Override
	protected IQueryDao<String, SaleServicePo> getQueryDao() {
		return saleServiceQueryDao;
	}
	
}
